feat: cache key param stability, cursor debug helper, health failure test, creator list query docs#335
Merged
Chucks1093 merged 1 commit intoMay 28, 2026
Conversation
…creator list docs Closes accesslayerorg#318 — add buildCanonicalParamString helper that sorts query params lexicographically before cache key generation, wire it into buildCreatorFeedCacheKey so equivalent param sets always map to the same cache entry, add unit tests covering ordering, omission of undefined values, and creator feed param equivalence. Closes accesslayerorg#313 — add formatCursorForDebug helper that decodes a pagination cursor into a human-readable key-value map for structured debug logging; returns null for tampered, malformed, or non-string input so call sites never throw. Wire it into checkIndexerCursorStalenessFromStore at debug level only. Add unit tests for valid payloads, tampered cursors, and edge input types. Closes accesslayerorg#314 — add health.controllers.integration.test.ts that simulates database unavailability for both the readiness and detailed health endpoints; asserts 503 status, degraded service flags, and that the response body continues to conform to the documented schema under failure. Closes accesslayerorg#315 — add docs/api/creator-list-query-precedence.md documenting sort+order coupling, cursor vs offset priority, AND semantics for search and verified, filter-before-sort ordering, strict unknown-key rejection, and repeated-param behaviour. Placed alongside existing API docs with cross-references to the relevant source files.
|
@Akanimoh12 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add helper for computing cache key stability across equivalent query param orderings #318 — Added
buildCanonicalParamStringhelper (src/utils/cache-key-params.utils.ts) that sorts query params lexicographically before cache key generation. Wired it intobuildCreatorFeedCacheKeyso two requests with identical params in a different order always resolve to the same cache entry. Unit tests confirm ordering independence,undefinedomission, and full creator feed param equivalence.Add helper for converting pagination cursor to debug-readable format #313 — Added
formatCursorForDebughelper (src/utils/cursor-debug.utils.ts) that decodes an opaque pagination cursor into a human-readable key-value map for structured logging. Returnsnullfor tampered, malformed, or non-string input so call sites never throw. Wired intocheckIndexerCursorStalenessFromStoreatlogger.debuglevel only — never appears ininfo-level or higher log paths. Unit tests cover valid payloads, type coercion, tampered cursors, and edge inputs.Add integration test for health endpoint under simulated dependency failure #314 — Added
health.controllers.integration.test.tsthat simulates database unavailability for both the/readyand/detailedhealth endpoints. Asserts503status code,ready: false/disconnecteddatabase state, unhealthy service flags, and that the full response body continues to conform to the documented schema even when the dependency is down.Add docs for creator list query parameter precedence rules #315 — Added
docs/api/creator-list-query-precedence.mddocumenting the precedence rules for conflicting and overlapping creator list query parameters:sort/ordercoupling, cursor vs offset priority, AND semantics forsearchandverifiedwhen both are present, filter-before-sort ordering, strict unknown-key rejection (400), and repeated-parameter handling. Placed alongside existing API docs with cross-references to the relevant source files and schema.Testing
pnpm lintpnpm buildChecklist
Closes #318
Closes #313
Closes #314
Closes #315